/*LICENSE_BEGIN
 * ******************************************************************
 * All original parts of SoccerScope2003 have copyright (2003) by
 * Team YowAI, represented by Mr. Shuhei Shiota
 * The Department of Creative Informatics
 * The Graduate School of Information Science and Technology
 * The University of Tokyo
 * 
 * Additional classes (except libraries in /lib) were developed by 
 * the Dainamite Robocup-Team of the DAI-Labor, TU-Berlin 
 * (www.dai-labor.de)
 * 
 * Extended/new classes/packages are:
 *   soccerscope.analyzer.LogfileAnalyzer
 *   soccerscope.daistatistic.*
 *   soccerscope.daistatistic.charts.*
 *   soccerscope.daistatistic.tools.*
 *   soccerscope.db.*
 *   soccerscope.dialog.*
 *   soccerscope.model.PlayerWorldModel
 *   soccerscope.model.SimplePlayer
 *   soccerscope.net.AgentConnector
 *   soccerscope.training.*
 *   soccerscope.training.conditions.*
 * ******************************************************************
LICENSE_END*/
package soccerscope.model;

import java.io.Serializable;

/**
 * list item of the starts of play modes
 */
public class ScenePlayModeListItem implements Serializable {
    
    private static final long serialVersionUID = 7685979949471770022L;

    /** the scene number where the play mode starts. */
    private int scene;

    /** the cycle number which is shown by the SoccerScope. */
    private int cycle;
    
    /** the new play mode. */
    private PlayMode mode;

    /**
     * Creates a new reference of a beginning play mode.
     * @param sceneNumber number of the scene where the new play mode starts
     * @param the cycle number which is shown by the SoccerScope
     * @param playMode the new play mode
     */
    public ScenePlayModeListItem(int sceneNumber, int cycleNumber, PlayMode playMode) {
        scene = sceneNumber;
        cycle = cycleNumber;
        mode = playMode;
    }

    /**
     * Returns the scene number where the play mode starts.
     * @return the scene number where the play mode starts.
     */
    public PlayMode getMode() {
        return mode;
    }

    /**
     * the new play mode.
     * @return the new play mode.
     */
    public int getScene() {
        return scene;
    }
    
    /**
     * Returns the cycle number which is shown by the SoccerScope.
     * @return the cycle number which is shown by the SoccerScope
     */
    public int getCycle() {
        return cycle;
    }
    
    public String toString() {
        return String.format("% 6d", cycle).substring(1).replaceAll("( *)", "$1$1") + " - " + mode.toString();
    }

}
